package com.dog.basics.bean.dto.admin.sys;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

@Data
public class SysUserSaveDto {


    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Size(min = 2, max = 20, message = "用户名长度要在2-20之间")
    @ApiModelProperty(value = "用户名", dataType = "String", required = false, example = "")
    private String username;

    /**
     * 密码
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;


    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号", dataType = "String", required = false, example = "")
    @Pattern(regexp = "0?1[0-9]{10}", message = "请输入正确的手机号")
    private String mobile;
    /**
     * 头像
     */
    @ApiModelProperty(value = "用户头像", dataType = "String", required = false, example = "")
    private String avatar;

    /**
     * 备用资料
     */
    @ApiModelProperty(value = "备用资料", dataType = "String", required = false, example = "")
    private String dataVal;
    /**
     * 角色ID列表
     */
    @NotEmpty(message ="角色ID列表不能为空")
    @ApiModelProperty(value = "角色ID列表", dataType = "List<Long>", required = true, example = "")
    private List<Long> roleIdList;
    /**
     * 角色code
     */
    @NotBlank(message ="角色code不能为空")
    @ApiModelProperty(value = "角色code", dataType = "String", required = true, example = "")
    private String remark;
    /**
     * 幼儿园ID
     */
    @ApiModelProperty(value = "幼儿园ID", dataType = "Long",required = false, example = "")
    private Long kindergartenId;

}
